{% extends "bugs/base.html" %}
{% block title %}Task list{% endblock %}
{% block content_title %}{% endblock %}
{% block stylesheet %}{% load media %}{% media_prefix %}css/bugs-table.css{% endblock %}
{% block main %}
<script type="text/javascript" src="{% media_prefix %}js/bugs-table-event.js"></script>

  <h2>{% block listtitle %}List Title{% endblock %}</h2>
  <div id="tablecontent">
  {% if tasklist %}
  <table width="100%" cellpadding="2" cellspacing="1">
  <tr bgcolor="#E3E4FF">
  <th width="5%" align="center">#</th>
  <th width="10%">Severity</th>
  <th width="5%">Kind</th>
  <th width="15%">Status</th>
  <th width="10%">Owner</th>
  <th width="55%">Summary</th>
  </tr>
  {% for task in tasklist %}
    <tr class="{% cycle 'even' 'odd' %}" onclick="trOnClick('{% url homesite.bugs.views.taskinfo project.norm_name,task.id %}')" onmouseover="trOnOver(this, '{% url homesite.bugs.views.taskinfo project.norm_name,task.id %}')" onmouseout="trOnOut(this)">
	  <td align="center">{{ task.serial }}</td>
	  {% ifnotequal task.status "Resolved" %}
	  <td  {% ifequal task.severity "Major" %}bgcolor="#FFEAEA"{% endifequal %}{% ifequal task.severity "Normal" %} bgcolor="#FFFFDA"{% endifequal %}{% ifequal task.severity "Minor" %}bgcolor="#DAFFDA"{% endifequal %}{% ifequal task.severity "Dream" %}bgcolor="#DADAFF"{% endifequal %}>{{ task.severity }}</td>
	  {% else %}
	  <td>{{ task.severity }}</td>
	  {% endifnotequal %}
	  <td align="center">
	  <img src="{% load media %}{% media_prefix %}img/{% ifequal task.kind 'Bug' %}bug.png{% else %}feature.png{% endifequal %}" border="0" alt=""></td>
	  <td><nobr>{{ task.status }} {% ifequal task.status "Resolved" %}({{ task.resolution }}){% endifequal %}</nobr></td>
	  <td>{{ task.owner }}</td>	  
	  <td>{{ task.summary }}</td>
    </tr>
  {% endfor %}
  </table>
  {% else %}
  <p>No tasks avalible</p>
  {% endif %}
  </div>
{% endblock %}
